﻿using RAP.Framework.Libary.Utils.Interfaces;
using System;
using System.Collections.Generic;
using System.Text;

namespace RAP.Framework.Libary.Utils.Factory
{
  /// <summary>
  /// 工厂对象基础接口
  /// </summary>
  /// <typeparam name="T"></typeparam>
  public interface IFactory<T> : IKeyValuePair<string, T>
  {
    event Action OnChange;
    void Initialize( );
    T Register( string key, T element );
    Func<T> Register( string key, Func<T> func );
    Type Register( string key, Type elementType );
    string Register( string key, string elementTypeName );
    void Remove( string key );
    void Clear( );
  }
}
